.class Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;
.super Ljava/lang/Object;
.source "ElementReginaWidget.java"

# interfaces
.implements Lcom/nemustech/tiffany/world/TFModel$OnTouchListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/nemustech/regina/ElementReginaWidget;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "WidgetBackCenterItemOnTouchListener"
.end annotation


# instance fields
.field private beforeTouchState:I

.field private clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

.field final synthetic this$0:Lcom/nemustech/regina/ElementReginaWidget;


# direct methods
.method private constructor <init>(Lcom/nemustech/regina/ElementReginaWidget;)V
    .locals 0
    .parameter

    .prologue
    .line 953
    iput-object p1, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/nemustech/regina/ElementReginaWidget;Lcom/nemustech/regina/ElementReginaWidget$1;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 953
    invoke-direct {p0, p1}, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;-><init>(Lcom/nemustech/regina/ElementReginaWidget;)V

    return-void
.end method


# virtual methods
.method public onLongPressdown(Lcom/nemustech/tiffany/world/TFModel;IFF)Z
    .locals 3
    .parameter "model"
    .parameter "faceIndex"
    .parameter "x"
    .parameter "y"

    .prologue
    const/4 v2, 0x0

    .line 1026
    const/4 v0, 0x3

    iput v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->beforeTouchState:I

    .line 1027
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    if-nez v0, :cond_0

    move v0, v2

    .line 1030
    :goto_0
    return v0

    .line 1029
    :cond_0
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mBackHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->hideClickedHighLightArea(Lcom/nemustech/tiffany/world/TFPanel;)V

    move v0, v2

    .line 1030
    goto :goto_0
.end method

.method public onSelected(Lcom/nemustech/tiffany/world/TFModel;IFF)Z
    .locals 1
    .parameter "model"
    .parameter "faceIndex"
    .parameter "x"
    .parameter "y"

    .prologue
    .line 959
    const/4 v0, 0x0

    return v0
.end method

.method public onTouchDown(Lcom/nemustech/tiffany/world/TFModel;IFF)Z
    .locals 10
    .parameter "model"
    .parameter "faceIndex"
    .parameter "x"
    .parameter "y"

    .prologue
    const/4 v9, 0x0

    .line 965
    const/4 v5, 0x2

    iput v5, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->beforeTouchState:I

    .line 966
    iget-object v5, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    invoke-static {v5}, Lcom/nemustech/regina/ElementReginaWidget;->access$1000(Lcom/nemustech/regina/ElementReginaWidget;)Ljava/util/ArrayList;

    move-result-object v5

    const/4 v6, 0x1

    invoke-virtual {v5, v6}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/LinkedList;

    .line 968
    .local v1, gadgetList:Ljava/util/LinkedList;,"Ljava/util/LinkedList<Lcom/nemustech/regina/ElementReginaWidget$Gadget;>;"
    iget-object v5, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    invoke-virtual {v5}, Lcom/nemustech/regina/ElementReginaWidget;->getLeft2D()I

    move-result v5

    int-to-float v5, v5

    sub-float v3, p3, v5

    .line 969
    .local v3, rx:F
    iget-object v5, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    invoke-virtual {v5}, Lcom/nemustech/regina/ElementReginaWidget;->getTop2D()I

    move-result v5

    int-to-float v5, v5

    sub-float v5, p4, v5

    iget-object v6, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget v6, v6, Lcom/nemustech/regina/ElementReginaWidget;->mTitle2DHeight:I

    int-to-float v6, v6

    sub-float v4, v5, v6

    .line 971
    .local v4, ry:F
    const/4 v0, 0x0

    .line 972
    .local v0, gadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;
    const/4 v2, 0x0

    .local v2, i:I
    :goto_0
    invoke-virtual {v1}, Ljava/util/LinkedList;->size()I

    move-result v5

    if-ge v2, v5, :cond_1

    .line 973
    invoke-virtual {v1, v2}, Ljava/util/LinkedList;->get(I)Ljava/lang/Object;

    move-result-object v0

    .end local v0           #gadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;
    check-cast v0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    .line 974
    .restart local v0       #gadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;
    float-to-int v5, v3

    float-to-int v6, v4

    invoke-virtual {v0, v5, v6}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->contains(II)Z

    move-result v5

    if-eqz v5, :cond_0

    .line 975
    iput-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    .line 976
    iget-object v5, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    iget-object v6, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v6, v6, Lcom/nemustech/regina/ElementReginaWidget;->mBackCenterItemPanel:Lcom/nemustech/tiffany/world/TFPanel;

    iget-object v7, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v7, v7, Lcom/nemustech/regina/ElementReginaWidget;->mBackHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v0}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->getTouchedArea()Landroid/graphics/Rect;

    move-result-object v8

    invoke-virtual {v5, v6, v7, v8}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->showClickedHighLightArea(Lcom/nemustech/tiffany/world/TFPanel;Lcom/nemustech/tiffany/world/TFPanel;Landroid/graphics/Rect;)V

    move v5, v9

    .line 980
    :goto_1
    return v5

    .line 972
    :cond_0
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_1
    move v5, v9

    .line 980
    goto :goto_1
.end method

.method public onTouchDrag(Lcom/nemustech/tiffany/world/TFModel;IFFFFI)Z
    .locals 3
    .parameter "model"
    .parameter "faceIndex"
    .parameter "sx"
    .parameter "sy"
    .parameter "ex"
    .parameter "ey"
    .parameter "tickPassed"

    .prologue
    const/4 v2, 0x0

    .line 986
    const/4 v0, 0x1

    iput v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->beforeTouchState:I

    .line 987
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    if-nez v0, :cond_0

    move v0, v2

    .line 990
    :goto_0
    return v0

    .line 989
    :cond_0
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mBackHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->hideClickedHighLightArea(Lcom/nemustech/tiffany/world/TFPanel;)V

    move v0, v2

    .line 990
    goto :goto_0
.end method

.method public onTouchUp(Lcom/nemustech/tiffany/world/TFModel;IFF)Z
    .locals 3
    .parameter "model"
    .parameter "faceIndex"
    .parameter "x"
    .parameter "y"

    .prologue
    const/4 v2, 0x0

    .line 995
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    if-eqz v0, :cond_0

    iget v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->beforeTouchState:I

    const/4 v1, 0x2

    if-eq v0, v1, :cond_1

    .line 996
    :cond_0
    iput v2, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->beforeTouchState:I

    move v0, v2

    .line 1021
    :goto_0
    return v0

    .line 1000
    :cond_1
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mBackHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->hideClickedHighLightArea(Lcom/nemustech/tiffany/world/TFPanel;)V

    .line 1001
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    invoke-virtual {v0}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->getGadgetType()I

    move-result v0

    sparse-switch v0, :sswitch_data_0

    .line 1019
    :goto_1
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    .line 1020
    iput v2, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->beforeTouchState:I

    move v0, v2

    .line 1021
    goto :goto_0

    .line 1007
    :sswitch_0
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    invoke-virtual {v0}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->runActorByGadget()V

    goto :goto_1

    .line 1011
    :sswitch_1
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    invoke-virtual {v0}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->runActorOnUIThreadByGadget()V

    goto :goto_1

    .line 1015
    :sswitch_2
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetBackCenterItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    invoke-virtual {v0}, Lcom/nemustech/regina/ElementReginaWidget;->userDefActor()V

    goto :goto_1

    .line 1001
    nop

    :sswitch_data_0
    .sparse-switch
        0x1 -> :sswitch_0
        0x6 -> :sswitch_1
        0x7 -> :sswitch_2
    .end sparse-switch
.end method
